
Last month marked 17 years since GitHub cofounder @defunkt casually changed the software development world with the blog post, “Oh yeah, there's pull requests now.” 🎉
Since then, pull requests have become the backbone of open source collaboration and team-based development. They help teams review, discuss, and merge changes efficiently while ensuring code quality and security.
If you’ve never created a pull request before, it can be an unfamiliar process. But that’s why GitHub Developer Advocate @ladykerr created the GitHub for Beginners series, which walks you through the process of creating a pull request, merging a pull request, and more, so you can get started contributing code today!
What is a pull request? 🔄
A pull request (often referred to as a “PR”) is a way to propose changes to a branch of a codebase before merging those changes into the main codebase. Branches allow developers to collaborate by reviewing, discussing, and refining changes without affecting in-production code. When talking about pull requests, we’ll often refer to the source branch and the target branch:
- Source branch: The branch where your changes live.
- Target branch: The branch you want to update with your changes.
Pull requests highlight the differences between the source and target branches, making it easier to review, provide feedback, and approve changes before they become part of the main project.
How to create the perfect pull request ✅
Crafting a great pull request isn’t just about submitting changes—it’s about making the review process as seamless as possible. Here’s how:
1. Keep it small and focused 🔍
Large pull requests are harder to review, introduce more room for errors, and slow down the development process. Stick to a single purpose per pull request whenever possible.
2. Provide clear context 📝
Include a well-structured title and description. In the pull request body, explain:
- The purpose of the pull request.
- A summary of what changed.
- Links to relevant issues, discussions, or documents.
- What kind of feedback you need from reviewers.
3. Review your own pull request first 🔄
Before submitting, build, test, and read through your changes. Catching typos, logic errors, or unclear documentation beforehand saves everyone time.
4. Think about security 🔒
Use GitHub’s built-in tools to review security concerns:
- Check the dependency diff for vulnerabilities.
- Review GitHub’s Advisory Database for potential issues.
- Use GitHub Copilot Autofix to help resolve flagged vulnerabilities.
5. Communicate with your team 🗣️
Pull requests aren’t just code reviews—they’re an opportunity to share progress and keep your team informed. Tag relevant people or teams, request specific feedback, and clarify deadlines or priorities.
How to create a pull request in git 🛠️
You can create a pull request on GitHub in several ways: using GitHub Desktop, GitHub Codespaces, GitHub Mobile, or the GitHub CLI.

You can also create a pull request from the terminal using git, which is what @ladykerr walks you through in her beginner’s guide to creating a pull request. Here are the basic steps:
1. Fork the repository: If you're contributing to a project you don't own, start by forking the repository to create your own copy.
2. Clone the repository: Clone your forked repository to your local machine:
git clone https://github.com/your-username/your-repository
3. Create a new branch: Navigate into your project directory and create a new branch for your feature or fix:
git checkout -b feature-branch-name
4. Make changes: Implement your changes or additions in the codebase.
5. Commit changes: After making changes, stage and commit them with a descriptive message:
git add .
git commit -m "Brief description of the changes"
6. Push changes: Push your changes to your forked repository on GitHub:
git push origin feature-branch-name
7. Open a pull request: On GitHub, navigate to the original repository. Click on the Compare & pull request button, then provide a clear title and description for your pull request, and click Create pull request to submit it for review.
Your next steps 🚀
Of course, creating a pull request is just a very important first step. Once you’ve created a pull request, it’s time for someone to review your code. Then if all goes well, they’ll merge it!

If you want to find out more about the full process, check out the GitHub for Beginners series for tips and videos on how to do it all!
For more tips, check out these resources in GitHub’s docs:
Ready to create your first pull request? Spin up a GitHub Codespace and start contributing today.
Happy coding! ✨
Get started with GitHub Codespaces
✨ This newsletter was written by Mike Melanson and produced by Gwen Davis. ✨
More to explore 🌎
Join our GitHub Codespaces conversations 🤖
Visit our community forum to see what people are saying + offer your own two cents.
Stay updated on GitHub products 📦
Discover the latest ships, launches, and improvements in our Changelog.
Subscribe to our LinkedIn newsletter 🚀
Do your best work on GitHub. Subscribe to our LinkedIn newsletter, Branching Out_.